﻿using UnityEngine;
using System.Collections;

public class MainMenuTrigger : ConsoleComponent
{
    public ConsoleMainMenu mainMenu;
    private bool showMenu;

    public MainMenuTrigger()
    {
        mainMenu = new ConsoleMainMenu();
    }

    public override void OnDrawing()
    {
        if (GUI.Button(
            GUIHelper.RatioRect(DebugConsole.R_SPACING, DebugConsole.R_SPACING, DebugConsole.BTN_R_WIDTH, DebugConsole.BTN_R_HEIGHT),
            "Console"))
            showMenu = !showMenu; // Toggle main menu

        if (showMenu)
            mainMenu.OnDrawing();
    }
}
